Skip to content

Conversation

@WeylonSantana
Copy link
Contributor

resolves #2610

Comment on lines 158 to 168
if (_entity is Player player && player != _me && string.IsNullOrWhiteSpace(player.Guild))
{
if (_me?.GuildRank?.Permissions?.Invite ?? false)
{
Insert(0, _targetNameMenuItem);
AddChild(_guildMenuItem);
}
}
else

if (_entity is Player plyr && plyr != _me)
{
Remove(_targetNameMenuItem);
AddChild(_privateMessageMenuItem);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_entity shouldn't be checked if it's a player twice

}

private void TryShowTargetButton(bool shouldShow)
private void _buildContextMenu(bool shouldShowTargetName = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call it BuildContextMenu

_nameDivider = new MenuDivider(this)
{
Dock = Pos.Top,
Margin = new Margin(IconMarginDisabled ? 0 : 24, 0, 4, 0),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does a divider have a margin?

{
Dock = Pos.Top,
Margin = new Margin(IconMarginDisabled ? 0 : 24, 0, 4, 0),
Height = 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessary when MinimumSize will already control this

@pandinocoder pandinocoder merged commit dc95f5d into AscensionGameDev:main Feb 23, 2025
1 check passed
@WeylonSantana WeylonSantana deleted the fix-2610 branch February 23, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Crash when trying to open targetbox combobox

2 participants